﻿using System;

namespace LogikBug
{
	/// <summary>
	/// 
	/// </summary>
    public static class DateTimeExtensions
    {
		/// <summary>
		/// 
		/// </summary>
		/// <param name="dateTime"></param>
		/// <returns></returns>
        public static string ToStringForEdit(this DateTime dateTime)
        {
            return string.Format("{0} {1}", dateTime.ToShortDateString(), dateTime.ToShortTimeString());
        }

		/// <summary>
		/// 
		/// </summary>
		/// <param name="dateTime"></param>
		/// <returns></returns>
        public static string ToStringForFeed(this DateTime dateTime)
        {
            return dateTime.ToString("R");
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="dateTime"></param>
		/// <param name="startDate"></param>
		/// <param name="endDate"></param>
		/// <returns></returns>
		public static bool IsBetween(this DateTime dateTime, DateTime startDate, DateTime endDate)
		{
			return (dateTime >= startDate && dateTime <= endDate);
		}
    }
}